libxc: match types of 'subject' and 'foreigndom' between struct xc_mmu and do_mmu_update
authorDario Faggioli <dario.faggioli@citrix.com>
Thu, 24 Jan 2013 12:47:57 +0000 (12:47 +0000)
committerDario Faggioli <dario.faggioli@citrix.com>
Thu, 24 Jan 2013 12:47:57 +0000 (12:47 +0000)
commit0c9dab50b15202f68c3025841c38272820128b2c
tree6e66480446e73d9887421c86c3876bec58283b48
parent553fd4753c3bcf25dd3824a75d459746f3380ef6
libxc: match types of 'subject' and 'foreigndom' between struct xc_mmu and do_mmu_update

In do_mmu_update() (in the hypervisor) the parameter 'foreigndom' is
'unsigned int' and both its high (bits 31-16) and low (bits 15-0) are
parts utilised, as explained here:
 http://xenbits.xen.org/docs/unstable/hypercall/include,public,xen.h.html#Func_HYPERVISOR_mmu_update

However, the actual parameter, i.e., the 'subject' field in
struct xc_mmu is declared as domid_t, which typedef-s to uint16_t.
This means we are never able to pass anything via the higher 16 bits
of 'foreigndom', which in turns may cause the hypercall to fail when
called on an actual foreign domain.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_private.c
tools/libxc/xc_private.h